#!/bin/bash
#SBATCH -n 1
#SBATCH --mem=2G
#SBATCH --mail-type=ALL
#SBATCH --time=94:00:00
#SBATCH --array=0-24
phenos=(Platelet_norm MCV_norm Height_norm BMI_norm DBP_norm SBP_norm WBC_norm RBC_norm Hemoglobin_norm Hematocrit_norm MCH_norm MCHC_norm Lymphocyte_norm Monocyte_norm Neutrophil_norm Eosinophil_norm Basophil_norm Urate_norm Cholesterol_norm Triglyceride_norm LDL_norm HDL_norm EGFR_norm HBA1C_norm CRP_norm) 
module load anaconda/3-5.2.0
source activate ldsc
echo ${phenos[$SLURM_ARRAY_TASK_ID]}


python2 ldsc.py --h2 sumstats/${phenos[$SLURM_ARRAY_TASK_ID]}.hapmap.1kg.covar.sumstats.gz --ref-ld-chr ld_scores/merged. --w-ld-chr weights_hm3_no_hla/weights. --overlap-annot --frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC. --out output_trickunildsc/${phenos[$SLURM_ARRAY_TASK_ID]} --print-coefficients
python2 ldsc.py --h2 sumstats/${phenos[$SLURM_ARRAY_TASK_ID]}.hapmap.1kg.covar.sumstats.gz --ref-ld-chr cisinteraction_scores/merged. --w-ld-chr weights_hm3_no_hla/weights. --overlap-annot --frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC. --out output_bivariateldsc/${phenos[$SLURM_ARRAY_TASK_ID]} --print-coefficients
python2 ldsc.py --h2 sumstats/${phenos[$SLURM_ARRAY_TASK_ID]}.hapmap.1kg.covar.sumstats.gz --ref-ld-chr mergedbaseline_cisinteractionscores/merged. --w-ld-chr weights_hm3_no_hla/weights. --overlap-annot --frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC. --out output_meldscores/${phenos[$SLURM_ARRAY_TASK_ID]} --print-coefficients
python2 ldsc.py --h2 sumstats/${phenos[$SLURM_ARRAY_TASK_ID]}.hapmap.1kg.covar.sumstats.gz --ref-ld-chr baseline_scores/baseline. --w-ld-chr weights_hm3_no_hla/weights. --overlap-annot --frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC. --out output_nomeldscores/${phenos[$SLURM_ARRAY_TASK_ID]} --print-coefficients